package com.abc.core.tool;

import com.abc.core.consts.DataType;
import com.abc.core.def.Dna;
import com.abc.core.def.Vd;

import java.time.LocalDateTime;

/**
 * @author lb
 */
public class MenuDnaTool {

    public static Dna getMenuDna() {
        Dna menuDna = new Dna("menuDnaCode", "menuDnaCode", "menu 菜单结构dna");
        menuDna.setMultiple(0, 999);
        menuDna.setDbMapCode("db_map_code_menu");
        menuDna.setCursive(false);
        menuDna.setLastTime(LocalDateTime.now());
        menuDna.addVd(new Vd("code", "菜单代码", DataType.DATA_TYPE_STRING));
        menuDna.addVd(new Vd("name", "菜单名称", DataType.DATA_TYPE_STRING));
        menuDna.addVd(new Vd("description", "菜单描述", DataType.DATA_TYPE_STRING));
        menuDna.addVd(new Vd("functionCode", "功能代码:单击时打开哪个功能界面", DataType.DATA_TYPE_STRING));

        menuDna.addVd(new Vd("mdCode", "扩展主数据代码", DataType.DATA_TYPE_STRING));
        menuDna.addVd(new Vd("mvCode", "扩展主数据值代码", DataType.DATA_TYPE_STRING));
        menuDna.addVd(new Vd("leaf", "是否叶子", DataType.DATA_TYPE_BOOLEAN));

        return menuDna;
    }
}
